package com.gidgabs.modules.entity;

import com.gidgabs.dto.TbShoppingCarDto;

import java.io.Serializable;
import java.util.Date;



/**
 * 购物车表
 * 
 * @author lanyonglin
 * @email www.baidu.com
 * @date 2018-07-02 10:07:07
 */
public class TbShoppingCarEntity implements Serializable {
	private static final long serialVersionUID = 1L;
	
	//
	private Integer id;
	//用户编号
	private Integer userId;
	//产品编号
	private Integer productId;
	//文图描述地址
	private String graphicIntroductionUrl;
	//产品数量
	private Integer amount;
	//产品单价
	private Integer price;
	//产品名称
	private String productName;
	//创建时间
	private Date createTime;
	//产品主人id
	private Integer productMasterId;

	public Integer getProductMasterId() {
		return productMasterId;
	}

	public void setProductMasterId(Integer productMasterId) {
		this.productMasterId = productMasterId;
	}

	public Integer getUserId() {
		return userId;
	}

	public void setUserId(Integer userId) {
		this.userId = userId;
	}

	public Integer getProductId() {
		return productId;
	}

	public void setProductId(Integer productId) {
		this.productId = productId;
	}

	public Date getCreateTime() {
		return createTime;
	}

	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}

	/**
	 * 设置：
	 */
	public void setId(Integer id) {
		this.id = id;
	}
	/**
	 * 获取：
	 */
	public Integer getId() {
		return id;
	}
	/**
	 * 设置：文图描述地址
	 */
	public void setGraphicIntroductionUrl(String graphicIntroductionUrl) {
		this.graphicIntroductionUrl = graphicIntroductionUrl;
	}
	/**
	 * 获取：文图描述地址
	 */
	public String getGraphicIntroductionUrl() {
		return graphicIntroductionUrl;
	}
	/**
	 * 设置：产品数量
	 */
	public void setAmount(Integer amount) {
		this.amount = amount;
	}
	/**
	 * 获取：产品数量
	 */
	public Integer getAmount() {
		return amount;
	}
	/**
	 * 设置：产品单价
	 */
	public void setPrice(Integer price) {
		this.price = price;
	}
	/**
	 * 获取：产品单价
	 */
	public Integer getPrice() {
		return price;
	}
	/**
	 * 设置：产品名称
	 */
	public void setProductName(String productName) {
		this.productName = productName;
	}
	/**
	 * 获取：产品名称
	 */
	public String getProductName() {
		return productName;
	}

	public TbShoppingCarDto toDto(){
		TbShoppingCarDto tbShoppingCarDto = new TbShoppingCarDto();
		tbShoppingCarDto.setUserId(this.getUserId());
		tbShoppingCarDto.setProductId(this.getProductId());
		tbShoppingCarDto.setCreateTime(this.getCreateTime());
		tbShoppingCarDto.setId(this.getId());
		tbShoppingCarDto.setAmount(this.getAmount());
		tbShoppingCarDto.setPrice(this.getPrice());
		tbShoppingCarDto.setProductName(this.getProductName());
		tbShoppingCarDto.setGraphicIntroductionUrl(this.getGraphicIntroductionUrl());
		tbShoppingCarDto.setProductMasterId(this.getProductMasterId());
		return tbShoppingCarDto;
	}
}
